package com.lmax.disruptor.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LoggerEvent {
    private String name;
    private String message;

    @Override
    public String toString() {
        return "{"
                + "\"name\":\""
                + StringUtils.trimToEmpty(name) + '\"'
                + ",\"message\":\""
                + StringUtils.trimToEmpty(message) + '\"'
                + "}";
    }

}
